package edu.zhku.salary;
import java.util.Scanner;

public class Caculate {
	public static void main (String args[]){
		double salary=0;
		double realSalary=0;
		System.out.println("请输入你的工资：");
		salary=new Scanner(System.in).nextDouble();
		if(salary < 5000){
			realSalary=salary;
		}
		else if(salary < 36000){
			realSalary=5000+(salary-5000)*(1-0.03);
		}
		else if(salary < 144000){
			realSalary=5000+(36000-5000)*(1-0.03)+(salary-36000)*(1-0.1);
		}
		else if(salary < 300000){
			realSalary=5000+(36000-5000)*(1-0.03)+(144000-36000)*(1-0.1)+(salary-144000)*(1-0.2);
		}
		else if(salary < 420000){
			realSalary=5000+(36000-5000)*(1-0.03)+(144000-36000)*(1-0.1)+(300000-144000)*(1-0.2)+(salary-300000)*(1-0.25);
		}
		else if(salary < 660000){
			realSalary=5000+(36000-5000)*(1-0.03)+(144000-36000)*(1-0.1)+(300000-144000)*(1-0.2)+(420000-300000)*(1-0.25)+(salary-420000)*(1-0.3);
		}
		System.out.println("你的实发工资是："+realSalary);
	}
	

}
